import java.util.ArrayList;
import java.util.ListIterator;

/**
 * @author 21195
 * @version v1.0
 * @package PACKAGE_NAME
 * @description:
 * @date 2019/9/11 19:19
 **/
public class TestTwo {
    public static void main(String[] args) {
        int[] arr = {5, 9, 9};
        ArrayList<Integer> list = new ArrayList<>();
        ArrayList<Integer> list1 = new ArrayList<>();
        for (int arrs : arr) {
            list.add(arrs);
        }
        Integer a = 1;
        for (ListIterator<Integer> it = list.listIterator(); it.hasNext(); ) {
            a *= it.next();
        }
        System.out.println(a);
        String str = a.toString();
        int[] ints = new int[str.length()];
        for (int i = 0; i < str.length(); i++) {
            Character ch = str.charAt(i);
            int i1 = Integer.parseInt(ch.toString());
            list1.add(i1);
        }
        Integer b = 0;
        for (ListIterator<Integer> it = list1.listIterator(); it.hasNext(); ) {
            b += it.next();
        }
        System.out.println(b);

    }
}





